﻿using UnityEngine;
using System.Collections;
using Cmd;
using DG.Tweening;
using GameData;

public class CleanTip : MonoBehaviour
{

    public GameObject okBtn;
    public GameObject cancleBtn;

	// Use this for initialization
	void Start () {

        EventTriggerListener.Get(okBtn).onClick = OnOck;
        EventTriggerListener.Get(cancleBtn).onClick = OnCancle;


    }


    public void OnOck(GameObject obj)
    {

        CleanGlobalSend cl = new CleanGlobalSend();
        cl.Send(GlobalVO.GetInstance().roleInfo.UserInfo, OnRoleRespone);



        transform.localScale = new Vector3(1, 1, 1);
        Tweener tw = transform.DOScale(new Vector3(0, 0, 0), 0.3f).SetEase(Ease.OutBack);
        gameObject.SetActive(false);

    }


    void OnRoleRespone(RoleInfo roleInfo)
    {
        
    }

    

    public void OnCancle(GameObject obj)
    {

        transform.localScale = new Vector3(1, 1, 1);
        Tweener tw = transform.DOScale(new Vector3(0, 0, 0), 0.3f).SetEase(Ease.OutBack);
        gameObject.SetActive(false);
    }


}
